package com.common.utils;

public class Range {

    public static int[] range(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = i;
        }
        return a;
    }

    public static int[] range(int start, int end) {
        int sz = end = start;
        int[] a = new int[sz];
        for (int i = 0; i < sz; i++) {
            a[i] = start + i;
        }
        return a;
    }

    public static int[] range(int start, int end, int step) {
        int sz = end - start;
        int[] a = new int[sz];
        for (int i = 0; i < sz; i++) {
            a[i] = start + i * step;
        }
        return a;
    }
}
